package com.zzyl.nursing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.dto.AddReservationDto;
import com.zzyl.nursing.dto.TimeSlotCountDto;
import com.zzyl.nursing.vo.ReservationVo;
import com.zzyl.nursing.vo.TimeCountVo;

import java.util.List;

public interface IReservationService extends IService<Reservation> {


    Integer cancelledCount();

    List<TimeCountVo> countReservationsForTime(Long time);

    Integer add(ReservationVo reservationVo);

    List<Reservation> selectReservationList(Reservation reservation);

    void setstatus(Long id);

    void updateReservationStatus();

    /**
     * 新增预约
     * @param dto
     * @return
     */
    boolean addReservation(AddReservationDto dto);
    // 3. 查询指定日期各时间段剩余预约次数
    List<TimeSlotCountDto> getTimeSlotCounts(Long timeMillis);
    // 1. 查询当天取消预约数量（按当前用户）
    int getTodayCancelledCountByUser();

    public Reservation selectReservationById(Long id);



    /**
     * 新增预约信息
     *
     * @param reservation 预约信息
     * @return 结果
     */
    public int insertReservation(Reservation reservation);

    /**
     * 修改预约信息
     *
     * @param reservation 预约信息
     * @return 结果
     */
    public int updateReservation(Reservation reservation);

    /**
     * 批量删除预约信息
     *
     * @param ids 需要删除的预约信息主键集合
     * @return 结果
     */
    public int deleteReservationByIds(Long[] ids);

    /**
     * 删除预约信息信息
     *
     * @param id 预约信息主键
     * @return 结果
     */
    public int deleteReservationById(Long id);
}
